import React, {Component} from 'react';
import { Form, Input, Button, Checkbox ,Card} from 'antd';
import './login.css'
class Login extends Component {

    render() {
        const layout = {
            labelCol: {span: 8},
            wrapperCol: {span: 16},
        };
        const tailLayout = {
            wrapperCol: {offset: 8, span: 16},
        };

        const Demo = () => {
            const onFinish = (values) => {
                console.log('Success:', values);
            };

            const onFinishFailed = (errorInfo) => {
                console.log('Failed:', errorInfo);
            };
            return (
                <Card title="Admin SYS" className="login">
                <Form
                    {...layout}
                    name="basic"
                    initialValues={{remember: true}}
                    onFinish={onFinish}
                    onFinishFailed={onFinishFailed}
                >
                    <Form.Item
                        label="用户名"
                        name="username"
                        rules={[{required: true, message: 'Please input your username!'}]}
                    >
                        <Input/>
                    </Form.Item>

                    <Form.Item
                        label="密码"
                        name="password"
                        rules={[{required: true, message: 'Please input your password!'}]}
                    >
                        <Input.Password/>
                    </Form.Item>

                    <Form.Item {...tailLayout} name="remember" valuePropName="checked">
                        <Checkbox>Remember me</Checkbox>
                    </Form.Item>

                    <Form.Item {...tailLayout}>
                        <Button type="primary" htmlType="submit">
                            Submit
                        </Button>
                    </Form.Item>
                </Form>
                </Card>
            )

        }
        return (<Demo/>)
    }
}
export default Login;
